The present invention relates to the field of information processing by digital computers, and more particularly to a method and system, in an electronic spreadsheet, for preserving some xe2x80x9csummaryxe2x80x9d information of a cell named range when some spreadsheet elements (like rows, or columns, or pages) are added or removed from the cell named range.
Before computers, numerical analyses, particularly financial ones, were usually prepared on an accountant""s columnar pad or spreadsheet, with pencil and calculator in hand. By organizing data into columns and rows, spreadsheets afford the rapid assimilation of information by a reader. The task of preparing a spreadsheet on paper, however, is not quite so fast. Instead, the process tends to be very slow, as each entry must be tediously calculated and entered into the spreadsheet. Since all calculations are the responsibility of the preparer, manually prepared spreadsheets are also prone to errors. Hence, preparation of spreadsheets by hand is slow, tedious, and unreliable.
With the advent of microcomputers, a solution was forthcoming in the form of xe2x80x9celectronic spreadsheets.xe2x80x9d Better known simply as xe2x80x9cspreadsheets,xe2x80x9d these software programs provide a computerized replacement for the traditional financial modeling tools: the accountant""s columnar pad, pencil, and calculator. In some regards, spreadsheet programs are to those tools what word processors are to typewriters. Spreadsheets offer dramatic improvements in ease of creating, editing, and using financial models.
A typical spreadsheet program configures the memory of a computer to resemble the column/row or grid format of an accountant""s columnar pad, thus providing a visible calculator for a user. Because this xe2x80x9cpadxe2x80x9d exists dynamically in the computer""s memory, however, it differs from paper pads in several important ways. Locations in the electronic spreadsheet, for example, must be communicated to the computer in a format which it can understand. A common scheme for accomplishing this is to assign a number to each row in a spreadsheet, a letter to each column, and another letter to each sheet (or page) of the spreadsheet. To reference a location at column A and row 1 of the second page (i.e., the upper-left hand corner), for example, the user types in xe2x80x9cB:Alxe2x80x9d. In this manner, the spreadsheet defines an addressable storage location or xe2x80x9ccellxe2x80x9d at each intersection of a row with a column within a given page.
Data entry into an electronic spreadsheet occurs in much the same manner that information would be entered on an accountant""s pad. After a screen cursor is positioned at a desired location, the user can enter alphanumeric information. Besides holding text and numeric information, however, spreadsheet cells can store special instructions or xe2x80x9cformulasxe2x80x9d specifying calculations to be performed on the numbers stored in spreadsheet cells. Such spreadsheet cells can also be defined and named as a range as long as they are arranged as a connex set of cells. A typical example of such a named range simply corresponds to a regular table found in an accountant""s pad. In this fashion, range names can serve as variables in an equation, thereby allowing precise mathematical relationships to be defined between cells. The structure and operation of a spreadsheet program, including advanced functions such as functions and macros, are documented in the technical, trade, and patent literature. For an overview, see e.g., Cobb, S., Using Quattro Pro 2, Borland-OsbomeIMcGraw-Mll, 1990; and LeBlond, G. and Cobb, D., Using 1-2-3, Que corp., 1985. The disclosures of each of the foregoing are hereby incorporated by reference.
Electronic spreadsheets offer many advantages over their paper counterparts. For one, electronic spreadsheets are much larger (i.e., hold more information) than their paper counterparts; electronic spreadsheets having thousands or even millions of cells are not uncommon. Spreadsheet programs also allow users to perform xe2x80x9cwhat-ifxe2x80x9d scenarios. After a set of computational relationships has been entered into a worksheet, thanks to imbedded formulas for instance, the spread of information can be recalculated using different sets of assumptions, with the results of each recalculation appearing almost instantaneously. Performing this operation manually, with paper and pencil, would require recalculating every relationship in the model with each change made. Thus, electronic spreadsheet systems were invented to solve xe2x80x9cwhat-ifxe2x80x99 problems, that is, changing an input and seeing what happens to an output.
Named ranges used to automate the computations in a spreadsheet can evolve during the xe2x80x9clifexe2x80x9d of a spreadsheet just as some entries may be added to or deleted from a classical table found in an accountant""s pad. Conventional spreadsheet tools offer some means for automatically adjusting the content of an existing named range when new elements (typically a new column, a new row or a new sheet) are added between elements already pertaining to the named range, or when some elements (typically a column, a row or a sheet) already pertaining to the named range are deleted. It is common to find in conventional spreadsheets some xe2x80x9csummaryxe2x80x9d information, such as the sum of a given set of cells, or the average value of a given set of cells. When such a xe2x80x9csummaryxe2x80x9d information is itself recorded within an element common to the named range it relates to, then the deletion of some elements (typically a column, a row or a sheet) may result in the disappearance of the xe2x80x9csummaryxe2x80x9d information if this information is located within the deleted elements. Furthermore such a xe2x80x9csummaryxe2x80x9d information may be referenced (for instance as the parameter of a formula) in another cell of the spreadsheet. In such a case, the disappearance of the xe2x80x9csummaryxe2x80x9d information results in an xe2x80x9cERRxe2x80x9d cell, translating the fact that conventional spreadsheets are not able to resolve the reference of a deleted cell. This limitation can be quite cumbersome in the frequent case where elements of a table must follow a predefined format imposing that such a range xe2x80x9csummaryxe2x80x9d information be defined within elements shared with the range it relates to.
The present invention relates to the field of information processing by digital computers, and more particularly to a method and system, in an electronic spreadsheet, for preserving some xe2x80x9csummaryxe2x80x9d information of a cell named range when some spreadsheet elements (like rows, or columns, or pages) are added or removed from said cell named range. The method of processing a range summary cell in a multi-dimensional spreadsheet comprising a plurality of cells identified by a cell address, comprises the steps of:
defining a range summary cell by specifying in a table:
a range summary cell address;
a cell range address identifying an associated cell range said range summary cell address being a function of the specified cell range address;
In response to a user request for adding or deleting a spreadsheet element sharing a common cell address along at least one dimension with the cell range associated with the range summary cell:
updating in the table, the cell range address of the cell range associated with the range summary cell according to the user request;
updating in the table, the range summary cell address according to the updated cell range address;
moving in the spreadsheet, the range summary cell according to the updated range summary cell address;
adding or deleting the spreadsheet element according to the user request;
updating in the table, the cell range address after the addition or the deletion of the spreadsheet element;
updating in the table, the range summary cell address according to the updated cell range address.